package com.springboot.springautowired.study;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

/**
 * @author mac
 * @date 2021/9/14 5:52 下午
 */
public class GetInstanceTest implements ApplicationContextAware {
    private ApplicationContext applicationContext;
    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        this.applicationContext = applicationContext;
    }

    public void operation(){
        Object bean = this.applicationContext.getBean("");
    }
}
